#ifndef Vector3H
#define Vector3H

#include <iostream>


// Vector4
class Vector4
{
public:

	static const unsigned int ELEMENTCOUNT = 4;
	static const float        EQUALLIMIT;
	static const Vector4      ZERO;
	static const Vector4      UNIT_X;
	static const Vector4      UNIT_Y;
	static const Vector4      UNIT_Z;
	static const Vector4      UNIT_W;

	union
	{
		float mElement[ELEMENTCOUNT];
		struct
		{
			float mX;
			float mY;
			float mZ;
			float mW;
		};
	};

	 Vector4();
 	 Vector4( const Vector4& v );
	 Vector4( float x, float y, float z, float w );
	 Vector4( const float data[ELEMENTCOUNT] );
	 Vector4( const int   data[ELEMENTCOUNT] );
	~Vector4();

	float          operator [] ( unsigned int i ) const;
	float&         operator [] ( unsigned int i );
	const Vector4& operator +  () const;
	Vector4        operator -  () const;
	Vector4        operator +  ( const Vector4& v ) const;
	Vector4        operator -  ( const Vector4& v ) const;
	Vector4        operator *  ( float s ) const;
	Vector4        operator /  ( float s ) const;
	Vector4&       operator =  ( const Vector4& v );
	Vector4&       operator += ( const Vector4& v );
	Vector4&       operator -= ( const Vector4& v );
	Vector4&       operator *= ( float s );
	Vector4&       operator /= ( float s );
	bool           operator == ( const Vector4& v ) const;
	bool           operator != ( const Vector4& v ) const;

	float    Dot( const Vector4& v ) const;
	float    GetSquaredLength() const;
	float    GetLength() const;
	Vector4& Normalize();

};

Vector4 operator * ( float s, const Vector4& v );

std::ostream& operator << ( std::ostream& o, const Vector4& v );


#endif
